import Vue from 'vue'
import Vuex from 'vuex'
import home from '@/store/home/home.js'
import team from '@/store/team/team.js'
import signing from '@/store/signing/signing.js'
Vue.use(Vuex)
const store = new Vuex.Store({
	state: {
		isGetPhone: undefined,
		userInfo: {},
		voucherNum: 0,
		baiduInfo: {}
	},
	mutations: {
		setUserInfo(state, info) {
			state.userInfo = info
			state.isGetPhone = info.isGetPhone
		},
		setBaiduInfo(state, info) {
			state.baiduInfo = info
		},
		setVoucherNum(state, voucherNum) {
			state.voucherNum = voucherNum
		}
	},
	modules: {
		home: home,
		team: team,
		signing: signing
	}
})
export default store
